package com.atguigu06.polymorphism.ex1;

public class Circle extends GeometricObject{
   private double r;

    public Circle(String color, double weight, double r) {
        super(color, weight);
        this.r = r;
    }


    public double getR() {
        return r;
    }


    public void setR(double r) {
        this.r = r;
    }

    public double getArea(){
        return this.r*this.r*Math.PI;
    }
}
